package org.jeecg.modules.relation.relschoolyearsemester.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.modules.relation.relbuildingclassroom.vo.RelBuildingClassroomVo;
import org.jeecg.modules.relation.relschoolyearsemester.entity.RelSchoolYearSemester;
import org.jeecg.modules.relation.relschoolyearsemester.mapper.RelSchoolYearSemesterMapper;
import org.jeecg.modules.relation.relschoolyearsemester.service.IRelSchoolYearSemesterService;
import org.jeecg.modules.relation.relschoolyearsemester.vo.RelSchoolYearSemesterVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import java.util.ArrayList;
import java.util.List;

/**
 * @Description: rel_school_year_semester
 * @author: baochangrong
 * @Date: 2022-02-17
 * @Version: V1.0
 */
@Service
public class RelSchoolYearSemesterServiceImpl extends ServiceImpl<RelSchoolYearSemesterMapper, RelSchoolYearSemester> implements IRelSchoolYearSemesterService {

    @Autowired
    RelSchoolYearSemesterMapper relSchoolYearSemesterMapper;

    /**
     * 全部查询 queryPageVoList
     */
    @Override
    public IPage<RelSchoolYearSemesterVo> queryPageVoList(Page<RelSchoolYearSemesterVo> page, String tenantId) {
        //获取该租户下所有建筑id
        List<RelSchoolYearSemesterVo> relSchoolYearSemesterVoList = relSchoolYearSemesterMapper.queryPageVoList(page, tenantId);

        return page.setRecords(relSchoolYearSemesterVoList);
    }

}
